package com.zmn.plat.services.impl.plat.contract.model.log;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.plat.contract.model.log.PlatContractModelLog;
import com.zmn.plat.model.entity.plat.contract.model.log.PlatContractModelLogQuery;
import com.zmn.plat.persistence.interfaces.plat.contract.model.log.PlatContractModelLogDao;
import com.zmn.plat.services.interfaces.plat.contract.model.log.PlatContractModelLogService;

@Service
public class PlatContractModelLogServiceImpl implements PlatContractModelLogService {

    @Resource
    PlatContractModelLogDao platContractModelLogDao;

    @Override
    public PlatContractModelLog findByKey(Integer id) {
        return platContractModelLogDao.findByKey(id);
    }

    @Override
    public List<PlatContractModelLog> listPageByQuery(PlatContractModelLogQuery query) {
        int count = countByQuery(query);
        query.setTotalCount(count);
        return platContractModelLogDao.listPageByQuery(query);
    }

    @Override
    public List<PlatContractModelLog> listByQuery(PlatContractModelLogQuery query) {
        return platContractModelLogDao.listByQuery(query);
    }

    @Override
    public List<PlatContractModelLog> listAll() {
        return platContractModelLogDao.listAll();
    }

    @Override
    public Integer countByQuery(PlatContractModelLogQuery query) {
        return platContractModelLogDao.countByQuery(query);
    }

    @Override
    public Integer updateByKey(PlatContractModelLog platContractModelLog) {
        return platContractModelLogDao.updateByKey(platContractModelLog);
    }

    @Override
    public Integer insert(PlatContractModelLog platContractModelLog) {
        return platContractModelLogDao.insert(platContractModelLog);
    }

    @Override
    public Integer deleteByKey(Integer id) {
        return platContractModelLogDao.deleteByKey(id);
    }

}